
// 自动生成模板Comments
package comment
import (
	"time"
)

// comments表 结构体  Comments
type Comments struct {
    Id  *int `json:"id" form:"id" gorm:"primarykey;column:id;comment:;size:20;"`  //id字段 
    CreatedAt  *time.Time `json:"createdAt" form:"createdAt" gorm:"column:created_at;comment:;"`  //createdAt字段 
    UpdatedAt  *time.Time `json:"updatedAt" form:"updatedAt" gorm:"column:updated_at;comment:;"`  //updatedAt字段 
    DeletedAt  *time.Time `json:"deletedAt" form:"deletedAt" gorm:"column:deleted_at;comment:;"`  //deletedAt字段 
    ObjectId  *int `json:"objectId" form:"objectId" gorm:"column:object_id;comment:对象id;size:10;"`  //对象id 
    ObjectType  *int `json:"objectType" form:"objectType" gorm:"column:object_type;comment:对象类型: 1商品 2文章 0未知;"`  //对象类型: 1商品 2文章 0未知 
    UserId  *int `json:"userId" form:"userId" gorm:"column:user_id;comment:用户id;size:10;"`  //用户id 
    File  *string `json:"file" form:"file" gorm:"column:file;comment:文件(图片和短视频);type:text;"`  //文件(图片和短视频) 
    Rating  *int `json:"rating" form:"rating" gorm:"column:rating;comment:评分;"`  //评分 
    Text  *string `json:"text" form:"text" gorm:"column:text;comment:评论内容;type:text;"`  //评论内容 
    Pid  *int `json:"pid" form:"pid" gorm:"column:pid;comment:父级评论;size:10;"`  //父级评论 
    Likes  *int `json:"likes" form:"likes" gorm:"column:likes;comment:喜欢;size:10;"`  //喜欢 
}


// TableName comments表 Comments自定义表名 comments
func (Comments) TableName() string {
    return "comments"
}





